remove implicit return & fix return signal#173
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors Taurus runtime execution to remove implicit return values and to fix/clarify return vs respond signal semantics, while reorganizing the workspace into clearer crates (taurus-core, taurus-provider, etc.) and adding flow fixtures that validate the new behavior.
Changes:
- Introduces a new compiled execution engine in
taurus-corewith explicitSignal/ExitReasonsemantics (Respondcontinues;Returnunwinds one frame). - Adds a NATS-based provider layer (
taurus-provider) and rewires thetaurusbinary into anappmodule + worker. - Adds/updates flow JSON fixtures and a dedicated execution test harness (
taurus-tests) to validate return/respond behavior.
Reviewed changes
Copilot reviewed 82 out of 85 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| flows/10_multiple_respond.json | New flow fixture exercising multiple respond emissions. |
| flows/09_filter_return.json | New flow fixture validating return inside iterator/predicate contexts. |
| flows/08_flow_level_return.json | New flow fixture validating root-level return behavior. |
| flows/07_simple_return.json | New flow fixture validating basic return behavior. |
| flows/05_if_control.json | Updates expectations/documentation to match new respond continuation semantics. |
| crates/tests/src/main.rs | Removes old test runner (replaced by taurus-tests). |
| crates/tests-core/src/lib.rs | Removes old shared test types crate. |
| crates/tests-core/Cargo.toml | Removes old shared test types crate manifest. |
| crates/taurus/src/main.rs | Delegates runtime startup to app::run(). |
| crates/taurus/src/config/mod.rs | Simplifies Taurus config (removes environment). |
| crates/taurus/src/app/mod.rs | New Taurus app orchestration (logging, health, dynamic services, shutdown). |
| crates/taurus/src/app/worker.rs | New worker loop using ExecutionEngine + provider emitter/remote runtime. |
| crates/taurus/Cargo.toml | Adds dependency on taurus-provider. |
| crates/taurus-tests/src/main.rs | New execution suite binary using ExecutionEngine directly. |
| crates/taurus-tests/README.md | Documents the execution suite + flow fixture format. |
| crates/taurus-tests/Cargo.toml | Drops dependency on removed tests-core. |
| crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs | Updates remote execution adapter to new RemoteRuntime interface + new RuntimeError. |
| crates/taurus-provider/src/providers/remote/mod.rs | Exposes remote provider module. |
| crates/taurus-provider/src/providers/emitter/nats_emitter.rs | Adds NATS emitter for streaming lifecycle/respond events. |
| crates/taurus-provider/src/providers/emitter/mod.rs | Exposes emitter provider module. |
| crates/taurus-provider/src/providers/mod.rs | Provider module root (remote + emitter). |
| crates/taurus-provider/src/lib.rs | Exposes provider crate API. |
| crates/taurus-provider/Cargo.toml | New provider crate manifest. |
| crates/taurus-manual/src/main.rs | New manual runner wired to provider remote/emitter + ExecutionEngine. |
| crates/taurus-manual/Cargo.toml | Adds taurus-provider, removes tests-core/async-trait. |
| crates/taurus-core/src/lib.rs | New taurus-core crate root (engine/types/value). |
| crates/taurus-core/src/value.rs | Adds module docs for numeric/value helpers. |
| crates/taurus-core/src/ERROR_CODES.md | Introduces runtime error code catalog and conventions. |
| crates/taurus-core/Cargo.toml | New taurus-core manifest. |
| crates/taurus-core/src/types/mod.rs | New shared domain types module root. |
| crates/taurus-core/src/types/signal.rs | New canonical Signal definition and helpers. |
| crates/taurus-core/src/types/exit_reason.rs | Adds payload-free exit reason enum. |
| crates/taurus-core/src/types/errors/mod.rs | New error module root. |
| crates/taurus-core/src/types/errors/runtime_error.rs | New structured runtime error payload (code/category/message/etc.). |
| crates/taurus-core/src/types/errors/error.rs | Adds app-level error type convertible into RuntimeError. |
| crates/taurus-core/src/types/execution/mod.rs | New execution model module root. |
| crates/taurus-core/src/types/execution/ids.rs | Adds execution-domain identifier newtypes. |
| crates/taurus-core/src/types/execution/signature.rs | Adds handler signature model types. |
| crates/taurus-core/src/types/execution/bindings.rs | Adds argument binding/expression model. |
| crates/taurus-core/src/types/execution/flow_ir.rs | Adds static flow graph model types. |
| crates/taurus-core/src/runtime/mod.rs | New runtime module root. |
| crates/taurus-core/src/runtime/remote/mod.rs | New RemoteRuntime abstraction + RemoteExecution wrapper. |
| crates/taurus-core/src/runtime/functions/mod.rs | New stdlib function catalog. |
| crates/taurus-core/src/runtime/functions/control.rs | New control handlers implementing updated return/respond behavior. |
| crates/taurus-core/src/runtime/functions/http.rs | Updates REST/HTTP helpers; respond now emits a control signal without terminating execution. |
| crates/taurus-core/src/runtime/functions/object.rs | Updates object handlers; keys now sorts for deterministic output. |
| crates/taurus-core/src/runtime/functions/boolean.rs | Updates boolean handlers for new handler/execution infrastructure. |
| crates/taurus-core/src/runtime/execution/mod.rs | New execution internals module root. |
| crates/taurus-core/src/runtime/execution/value_store.rs | New reference/value store for execution. |
| crates/taurus-core/src/runtime/execution/trace.rs | New trace model (v2) capturing store snapshots/diffs. |
| crates/taurus-core/src/runtime/execution/tracer.rs | New in-memory tracer implementation. |
| crates/taurus-core/src/runtime/execution/render.rs | New human-readable trace renderer. |
| crates/taurus-core/src/runtime/execution/store.rs | Adds structured execution store types (node outcomes, input slots). |
| crates/taurus-core/src/runtime/execution/registry.rs | Adds handler metadata registry types. |
| crates/taurus-core/src/runtime/engine.rs | New public execution API (ExecutionEngine) + tests validating semantics. |
| crates/taurus-core/src/runtime/engine/compiler.rs | New flow compiler (node list -> compiled plan). |
| crates/taurus-core/src/runtime/engine/model.rs | New compiled plan model. |
| crates/taurus-core/src/runtime/engine/executor.rs | New execution loop implementing Return unwinding and Respond continuation. |
| crates/taurus-core/src/runtime/engine/emitter.rs | New emitter abstraction for lifecycle + streaming signals. |
| crates/taurus-core/src/handler/mod.rs | New handler infrastructure module root. |
| crates/taurus-core/src/handler/registry.rs | New handler registry + parameter evaluation mode model. |
| crates/taurus-core/src/handler/macros.rs | Updates args!/no_args! macros to new error model. |
| crates/taurus-core/src/handler/argument.rs | Updates handler argument model + typed extraction to new error model. |
| crates/manual/src/main.rs | Removes old manual runner (replaced by taurus-manual). |
| crates/core/src/lib.rs | Removes legacy core crate (superseded by taurus-core). |
| crates/core/src/runtime/mod.rs | Removes legacy runtime module. |
| crates/core/src/runtime/remote/mod.rs | Removes legacy remote runtime trait. |
| crates/core/src/runtime/functions/mod.rs | Removes legacy stdlib registration. |
| crates/core/src/runtime/functions/control.rs | Removes legacy control handlers. |
| crates/core/src/runtime/error/mod.rs | Removes legacy runtime error type. |
| crates/core/src/context/mod.rs | Removes legacy context module. |
| crates/core/src/context/context.rs | Removes legacy context state implementation. |
| crates/core/src/context/executor.rs | Removes legacy executor implementation. |
| crates/core/src/context/registry.rs | Removes legacy handler registry. |
| crates/core/src/context/signal.rs | Removes legacy signal type. |
| crates/core/src/debug/mod.rs | Removes legacy debug module. |
| crates/core/src/debug/trace.rs | Removes legacy trace model. |
| crates/core/src/debug/tracer.rs | Removes legacy tracer. |
| crates/core/src/debug/render.rs | Removes legacy trace renderer. |
| crates/core/.gitignore | Removes legacy crate gitignore. |
| Cargo.toml | Updates workspace members and workspace dependencies to new crate layout. |
| Cargo.lock | Updates dependency graph for crate renames/additions. |
Comments suppressed due to low confidence (6)
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:29
- Log message has an extra colon ("topic: : {}"), which makes logs noisy and harder to search/parse. Remove the duplicated ':' so the log line is consistent.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:41 - "RemoteRuntimeExeption" is misspelled in both logs and the emitted RuntimeError category. Since this category is surfaced to callers and appears in logs/metrics, please correct it consistently (e.g., "RemoteRuntimeException").
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:57 - Same spelling issue here: "RemoteRuntimeExeption" is misspelled in the log message and the emitted RuntimeError category. Please use a consistent, correctly spelled category string throughout (e.g., "RemoteRuntimeException").
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:78 - RuntimeError category string here also uses the misspelled "RemoteRuntimeExeption". For consistency across error reporting, correct the spelling everywhere this category is used (e.g., "RemoteRuntimeException").
crates/taurus-core/src/handler/argument.rs:36 - Typo in this user-facing error string: "arugment" should be "argument".
crates/taurus-core/src/runtime/functions/http.rs:69 - The error message here says "Expected 'status_code' to be NumberValue", but this handler reads the field "http_status_code". This mismatch will confuse callers when debugging invalid response structs; align the message with the actual required field name.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fb0fe9a to
57b1db0
Compare
GitLab Pipeline ActionGeneral informationLink to pipeline: https://gitlab.com/code0-tech/development/taurus/-/pipelines/2475274163 Status: Passed Job summariesdocs:previewDocumentation preview available at https://code0-tech.gitlab.io/-/development/telescopium/-/jobs/14064064516/artifacts/out/index.html |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 82 out of 85 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (8)
crates/taurus-core/src/handler/argument.rs:36
- Typo in the runtime error message:
arugmentshould beargument. Since this string is surfaced to users/tests, fixing it will make diagnostics clearer and avoid propagating the misspelling to clients.
crates/taurus-core/src/runtime/functions/http.rs:68 - In
respond(), the validation error message saysExpected 'status_code' to be NumberValue, but the function actually reads thehttp_status_codefield. This mismatch will confuse users when debugging malformed responses; update the message to referencehttp_status_codeconsistently.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:78 - Same typo in the
RuntimeErrorcategory for the empty-result branch (RemoteRuntimeExeption). If consumers key offcategory, this will fragment metrics/handling; please align the spelling with the intended category name everywhere.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:29 - The log line includes a duplicated colon (
topic: : {}), which makes grepping/log parsing noisy. Consider fixing the formatting so the emitted topic string is clean.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:57 - Same typo in the
RuntimeErrorcategory for the decode-error path (RemoteRuntimeExeption). Since category names are part of the public error surface, please correct it consistently across all branches.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:36 RemoteRuntimeExeptionis misspelled (should beRemoteRuntimeException). Because this string is used in logs and as thecategoryforRuntimeError, the typo can leak into external error handling/metrics; please correct it consistently.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:41- The
RuntimeErrorcategory string usesRemoteRuntimeExeption(typo). Since categories are intended to be stable and filterable, fix the spelling (e.g.,RemoteRuntimeException) to avoid baking in an incorrect category name.
crates/taurus-provider/src/providers/remote/nats_remote_runtime.rs:52 - Same misspelling (
RemoteRuntimeExeption) appears in the decode-error log message. Keeping these strings consistent (and correctly spelled) helps with log searchability and alerting.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| "name": "05_if_control", | ||
| "description": "This flow expects an object as input (from http request) structured payload.test = bool which the flow will return", | ||
| "description": "This flow expects an object as input (from http request) structured payload.test = bool which the flow will return (remeber: respond does not stop the flow so only the adapter will have `Blub` or `true` but the flow always results into `Blub`)", |
There was a problem hiding this comment.
Spelling/typo in the flow description: remeber → remember. Since these JSON files are user-facing test/docs artifacts, fixing typos helps avoid confusion.
Will Resolve: #172 and #159